Memory card having buffer memory for storing testing instruction

ABSTRACT

A memory card ( 1 ) includes an electrically rewritable non-volatile memory ( 4 ), a data processor ( 3 ) having a function of executing instructions, and managing the allocation of file data in the non-volatile memory, an interface control circuit ( 2 ) having a function of establishing an external interface, for controlling the execution of instructions by the data processor in response to external commands and for controlling access to the non-volatile memory and a buffer memory ( 7 ) for temporarily storing the file data. The interface control circuit includes command control means for decoding a first command externally supplied and for instructing the data processor to fetch an instruction from the buffer memory and to operate.

This is a continuation application of U.S. Ser. No. 10/874,381, filedJun. 24, 2004 now U.S. Pat. No. 7,002,853; which is a continuation ofU.S. Ser. No. 10/654,957, filed Sep. 5, 2003, now abandoned; which is acontinuation of U.S. Ser. No. 09/495,955, filed Feb. 2, 2000, now U.S.Pat. No. 6,643,725.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to memory cards such as file memories, andrelates to a technique advantageously applied to, for example, a memorycard in which functions of a file memory is included on a single chip.

2. Description of the Related Art

A file memory is a memory card capable of storing file data utilizing atechnique similar to management of file allocation by using an FAT (fileallocation table) in a hard disk. For example, an electricallyrewritable flash memory is used as file data storage area in such a filememory. When file data are accessed, the data are temporarily stored ina buffer memory. For example, file data to be written stored in thebuffer memory are written in the flash memory after being assigned withan ECC code at an ECC circuit, and file data read from the flash memoryand stored in the buffer memory are output to the outside after errorcheck and correction using an ECC code.

A file memory frequently incorporates a data processor such as amicrocomputer for purposes including file management and control ofaccess to the buffer memory.

PCMCIA-ATA type flash memory cards which are one type of file memoriesare described on pages 78 and 79 of “Nikkei Electronics” published onApr. 11, 1994.

SUMMARY OF THE INVENTION

The inventors have conducted a study on a control program area of a filememory having a data processor. A file memory requires a program fordebugging or testing in addition to a program for normal filemanagement. The required programs are normally incorporated in a memorycard even when the file memory incorporates a data processors, such as amicroprocessor, because such a data processor does not need a functionof accessing outside the memory card. The storage capacity of a ROM forstoring programs is thus increased by the program for debugging andtestings and the like, which results in a problem in that the scale ofthe circuit is increased. Especially, the inventor found that acountermeasure needed when limitations placed upon chip sizes and thelikes do not allow a random increase of the storage capacity of a ROM inimplementing functions of a memory card such as a file memory in theform of a semiconductor integrated circuit by loading them on a singlechip.

It is an object of the invention to provide a memory card in which adata processor incorporated therein can be caused to execute newprograms for purposes including testing or debugging without adding aseparate program memory.

The above and other objects and novel features of the invention willbecome apparent from the description of this specification and theaccompanying drawings.

Typical aspects of the invention disclosed in this application can besummarized as follows.

There is provided a memory card 1 comprising an electrically rewritablenon-volatile memory 4, a data processor 3 having a function of executinginstructions capable of managing the allocation of file data in thenon-volatile memory, an interface control circuit 2 having a function ofestablishing external interface, for controlling the execution ofinstructions by the data processor in response to external commands andfor controlling access to the non-volatile memory and a buffer memory 7for temporarily storing the file data, in which the buffer memory can beused also as a program memory. Specifically, there is provided commandcontrol means 24, 26 for decoding a first command CMD1 supplied from theoutside and for instructing the data processor to fetch an instructionfrom the buffer memory and to operate. This makes it possible to causethe integrated data processor to execute new programs for purposesincluding testing or debugging without adding a separate program memory.

Interrupt may be used as a method of control for causing the dataprocessor to execute a program PGM1 stored in the buffer memory. In thiscase, the command control means may employ a configuration in which aninterrupt is requested to the data processor and a first cause ofinterrupt is notified to the same by decoding the first command.

When vector control is used as a method for controlling the interrupt,the data processor includes a central processing unit 30 capable ofresponding to an interrupt by transferring the process to an instructionaddress indicated by a vector retrieved from a vector table 340according to the cause of interrupt and a ROM 34 to be accessed by thecentral processing unit. The ROM 34 includes the vector table 340 and aprogram area 341, and the vector table includes a first vector VCT1associated with the first cause of interrupt. Thus, the centralprocessing unit can execute an instruction from the beginning of theprogram in the buffer memory indicated by the first vector.

The program PGM1 may be transferred to the buffer memory from theoutside or from the integrated flash memory. The usability of the filememory is improved by allowing the file memory to transfer the programto the buffer memory by itself. For example, when the program PGM1 isallowed to be stored in the buffer memory from the outside of the filememory, the command control means further requests the data processor aninterrupt and notifies it of a second cause of interrupt by decoding asecond command CMD2 supplied from the outside. The vector table in theROM further includes a second vector VCT2 that responds to the secondcause of interrupt. The program area of the ROM further includes atransfer control program PGM2 for storing the externally suppliedprogram in the buffer memory starting from a first address thereof. Inthis case, the second vector is information indicating the leadingaddress of the transfer control program, and the first address is anaddress that coincides with the address indicated by the first vectorVCT1.

When the program PGM1 is allowed to be stored in the buffer memory fromthe non-volatile memory incorporated in the file memory, the commandcontrol means further requests the data processor an interrupt andnotifies the same of a third cause of interrupt by decoding a thirdcommand CMD3 supplied from the outside. The vector table in the ROMfurther includes a third vector VCT3 that responds to the third cause ofinterrupt. The program area of the ROM further includes a transfercontrol program PGM3 for storing the program supplied from thenon-volatile memory in the buffer memory starting from the first addressthereof. In this case, the third vector is information indicating theleading address of the transfer control program, and the first addressis an address that coincides with the address indicated by the firstvector.

In the memory card 1 constituted by a single chip, even when a randomincrease of the storage capacity of the ROM is inhibited by limitationson the chip size and the like, the programs for purposes includingdebugging or testing can be executed within the limitations.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a memory card LSI which is an example of amemory card according to the invention.

FIG. 2 is a block diagram of an example of a data processing system thatutilizes a card select signal unique to each memory card LSI.

FIG. 3 is a block diagram of an example of a data processing system thatutilizes card addresses transmitted along with commands.

FIG. 4 is a block diagram of an example of a host interface circuit.

FIG. 5 illustrates vectors maintained by a ROM and a programmable areaof a buffer RAM along with a CPU address map.

FIG. 6 illustrates an example of a state of execution of an extendedprogram.

FIG. 7 illustrates a state of execution of a first transfer controlprogram for storing an external extended program in a buffer RAM.

FIG. 8 illustrates a state of execution of a second transfer controlprogram for storing an extended program from a flash memory in a bufferRAM.

FIG. 9 illustrates a flow of data during a write of file data into aflash memory using a buffer RAM as a data buffer.

FIG. 10 illustrates a flow of data during a read of file data from aflash memory using a buffer RAM as a data buffer.

FIG. 11 illustrates a flow of data during input and output of work datato and from a CPU using a buffer RAM as a data buffer.

FIG. 12 illustrates a flow of data during input and output of work databetween a CPU and a flash memory using a buffer RAM as a data buffer.

FIG. 13 illustrates a principle of information storage in a flashmemory.

FIG. 14 is a circuit diagram of a memory cell array utilizing flashmemory cell transistors showing a principle of the configurationthereof.

FIGS. 15A, 15B and 15C illustrate examples of conditions for voltagesfor erase and write operations on flash memory cells.

FIG. 16 is a block diagram of an example of flash memory.

FIG. 17 is a circuit diagram of an example of a static memory cell.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

[Summary of Memory Card LSI ]

FIG. 1 shows a semiconductor integrated circuit for a memory cardaccording to an embodiment of the invention. The illustratedsemiconductor integrated circuit may be regarded as a system-on-chiptype LSI (semiconductor integrated circuit) that constitutes a minimumunit of a file memory and is formed on a single semiconductor substrate(chip) such as single crystal silicon, although this is not limiting theinvention.

A semiconductor integrated circuit (also simply referred to as “memorycard LSI”) 1 shown in FIG. 1 has an interface control circuit 2, amicrocomputer 3 which is an example of a data processor, a flash memory4 which is an example of an electrically rewritable non-volatile memory,a reset circuit 5, a clock oscillation circuit 6 utilizing anoscillator, a buffer RAM 7 and a work RAM 8.

A power supply voltage Vcc and a ground voltage Vss are externally inputto the memory card LSI 1 as operating power supplies. The input powersupply voltage Vcc and ground voltage Vss are supplied to each of theabove-described circuits.

The interface control circuit 2 has a host interface circuit (Host I/F)11, a microcomputer interface (Micro I/F) 12, a file control logic (FCL)13 and a data transfer logic (DTL) 14 which are connected each other bya bus 10.

A clock signal (Clock) 2A and a card select signal (Card Select) 2D areexternally input to the host interface circuit 11, and a command(Command) 2B and data (Data) 2C are input to and output from the same.Each of the command 2B and data 2C is input and output on a bit serialbasis, although this is not limiting the invention. The host interfacecircuit 11 accepts the externally supplied command 2B and decodes it toinstruct operations of the microcomputer 3 and flash memory 4 and tocontrol file data access to the flash memory 4.

The instruction of an operation of the microcomputer 3 is performed bysupplying an interrupt signal NMI and a cause of interrupt from the hostinterface circuit 11 to the microcomputer 3 through the microcomputerinterface 12. The microcomputer interface 12 exchanges the interruptsignal NMI, a control signal Ctl and various data such as datainformation and control information with the microcomputer 3.

The file control logic 13 controls file data access to the flash memory4 according to the result of command decoding at the host interfacecircuit 11 under control of the microcomputer 3.

The buffer RAM 7 is used as a file data buffer memory for temporarilystoring file data externally supplied to the host interface circuit 11or temporarily storing file data read from the flash memory 4. It isalso used as an extended program memory for the microcomputer 3.

The control over access to the buffer RAM 7 is carried out through thedata transfer logic 14. The data transfer logic 14 has an ECC circuit14A to check and correct errors during access to the buffer RAM 7 withthe ECC circuit.

When the buffer RAM 7 is used as a file data buffer memory, in a filedata writing operation, the file data are read by the data transferlogic 14 from the buffer RAM 7 on to the bus 10, and the read file dataare written in the flash memory 4 under control of the file controllogic 13. In a file data reading operation, the file data are read fromthe flash memory 4 on to the bus 10 under control of the file controllogic 13, and the read file data are written in the buffer RAM 7 undercontrol of the file transfer logic 14. The state in which the buffer RAM7 is used as a buffer memory for file data is achieved when a fileaccess command is externally supplied to the interface control circuit2; an interrupt according to the result of decoding of the command isaccepted by the microcomputer; and the result of the decoding of thecommand is supplied to the file control logic 13 and file transfer logic14.

The buffer RAM 7 is mapped to an address space of the microcomputer 3(more particularly, a CPU 30 to be described later). The microcomputer 3can access the buffer RAM 7 similarly to access to the work RAM 8through the data transfer logic 14. For example, this mode of access isenabled when the buffer RAM 7 is used as an extended program memory ofthe microcomputer 3. The state in which the microcomputer 3 utilizes thebuffer RAM 7 as an extended program memory is realized when an externalcommand for the execution of an extended program is supplied to theinterface control circuit 2 and an interrupt according to the result ofdecoding of the command is accepted by the microcomputer 3. This processwill be detailed later.

The file memory LSI 1 has a file data access system which is compatiblewith a hard disk apparatus, although this is not limiting the invention.For example, one cluster which is a unit area for access managementincludes four sectors, and a management area is allocated to each of theclusters. A management area has pointer information for determining thearrangement of clusters forming a file, information on the number ofrewrites, information identifying good and defective sectors and thelike. Further, the flash memory 4 has a directory area that identifiesthe file name of a file stored therein and the leading cluster of thesame.

In order to manage the arrangement of file data in clusters in the flashmemory 4, the microcomputer 3 generates a management table in theintegrated SRAM 35 based on information of the management areas anddirectory area. The microcomputer 3 controls the generation and updateof the management table and generates information specifying amanagement unit area to be accessed at access to file data using themanagement table. The information for controlling access to file data issupplied to the file control logic 13 through the microcomputerinterface 12.

The microcomputer 3 has a central processing unit (CPU) 30, anintegrated ROM (read only memory) 34 in which an operation program ofthe CPU 30 and the like are stored, an integrated SRAM (static randomaccess memory) 35 used as a work area of the CPU 30 or an area fortemporarily storing data, a bus controller (BSC) 33 for controlling thebus cycle of an external bus 37 when the CPU 30 accesses an externaladdress space and a user break controller (UBC) 31 for supportingdebugging such as breakpoint control, which are each connected to aninternal bus 38. An interrupt signal NMI and a cause of interrupt areinput to an interrupt control circuit (INTC) 32 which in turn requeststhe CPU 30 an interrupt by performing interrupt priority control. Aninterrupt processing program is stored in the integrated ROM 34,although this is not limiting the invention.

A watch dog timer (WDT) 36 for monitoring the run away of the CPU 30 andthe like is connected to the external bus 37 of the microcomputer 3 inaddition to the bus controller 33. Further, the work RAM 8 andmicrocomputer interface 12 are connected through the bus. Themicrocomputer 3 has one I/O port 39A as another interface circuit. TheI/O port 39A is exclusively used for inputting the interrupt signal NMIand outputting control signals represented by the control signal Ctl. Nogeneral purpose I/O is provided, although this is not limiting theinvention.

The microcomputer 3 has a sleep mode and a standby mode as low powerconsumption modes, although this is not limiting the invention. The CPU30 executes a sleep instruction when a standby control bit provided in acontrol register (not shown) has a first logical value to enter thesleep mode. In the sleep mode, the CPU 30 stops operating with the stateof the register and the like kept unchanged. Peripheral circuitscontinue operating. The sleep mode is cancelled by an interrupt orreset. The CPU 30 executes a sleep instruction when the standby controlbit provided in the control register has a second logical value to enterthe standby mode. In the standby mode, the CPU 30 stops operating withthe state of the register and the like kept unchanged, and theperipheral circuits also stop operating. The standby mode is canceled byan interrupt or reset.

A clock signal CLK2 is supplied from the oscillation circuit 6 to aclock pulse generator 39B of the microcomputer 3. For example, when themicrocomputer 3 is set in the standby mode, the oscillation circuit 6stops outputting the clock signal CLK2 according to a signal output bythe microcomputer 3 in response. When the interrupt signal NMI isasserted from the microcomputer interface 12 to the port 39A in thisstate, the clock control circuit 15 detects the same state. Accordingly,the clock control circuit 15 causes the oscillation circuit 6 to resumethe supply of the clock signal CLK2. Therefore, when the CPU 30 respondsto the interrupt, the microcomputer 3 can leave the standby mode becausesupply of the clock signal CLK2 has already been resumed by then.

The reset circuit 5 resets the interface control circuit 2 with a resetsignal RES1 and resets the microcomputer 3 with a reset signal RES2. Theflash memory 4 is reset by a reset signal RES3 which is controlledaccording to the value of a reset enable bit RSB provided in a controlregister in the file control logic (FCL) 13.

FIGS. 2 and 3 show examples of a data processing system utilizing memorycard LSIs 1 as described above. Although not shown, the memory card LSIs1 are packaged using a technique such as resin molding with connectorsthereof exposed. 100 represents a host system, and 101 represents slotsfor mounting the memory cards. FIGS. 2 and 3 illustrate configurationsto allow a plurality of memory card LSIs 1 to be mounted at a time. Theclock signal line 2A, command signal line 2B and data signal line 2C areshared by the memory card LSIs 1 in both of the configurations. Theselection of the plurality of memory card LSIs 1 mounted is carried outusing the card select signal 2D specific to each of the memory card LSIs1 in the example in FIG. 2 and using card addresses transmitted alongwith commands in the example in FIG. 3. In the example in FIG. 3, amemory card LSI 1 recognizes that it has been selected upon the input ofa card address allocated to it at an initializing operation.

FIG. 4 is a block diagram of the host interface circuit 11. Referring toFIG. 4, the host interface circuit 11 has a command input register 20 towhich the command 2B is input, a response control circuit 21 forresponding to the input of commands, a data input register 22 to whichdata 2C are input and a data output register 23 for outputting the data2C. An input command is decoded by a command decoder 24 and, inaccordance with the result of the decoding, a control logic circuit 26controls interrupts to the microcomputer 3, data input and output,responses to a host apparatus and the like. 27 represents a memory fortemporary storage used by the control logic 26.

[Execution of Extended Program]

Next, said buffer RAM7 will be described usable constraction as saidextended program memory in detail.

For example, an extended program is executed using vector type interruptcontrol performed by the microcomputer 3. The vector interrupt of themicrocomputer 3 is performed as follows. Specifically, themicroprocessor 3 is notified of an interrupt by an interrupt signal NMIfrom the interface control circuit 2. The interrupt control circuit 32performs interrupt priority control and the like on the interruptinitiated by the interrupt signal NMI and asserts an interrupt requestsignal INT to the CPU 30 when the interrupt is accepted. When theinterface control circuit 2 detects the acceptance of the interrupt, itsupplies information specifying a cause of the interrupt to the externalbus 37 through the microcomputer interface 12. The CPU 30 retrieves avector associated with the cause of interrupt from the vector table. TheCPU 30 proceeds to an instruction address indicated by the retrievedvector and branches to a process of responding to the interrupt. In thecase of an interrupt for which the process is to return to the stateimmediately preceding the interrupt after the process of responding tothe interrupt, the state is obviously saved before the process ofresponding to the interrupt.

FIG. 5 shows mapping of the addresses of the integrated ROM 34, work RAM8, buffer RAM 7 and integrated SRAM 35 to an address space which can bemanaged by the CPU 30.

A part of the buffer RAM 7 is an area 70 which can be used also as anextended program memory (programmable area), although this is notlimiting the invention. A program stored in the programmable area 70 isreferred to as “extended program PGM1”.

The integrated ROM 34 has the vector table 340 and program area 341. Thevector table 340 typically has a first vector VCT1, a second vector VCT2and a third vector VCT3. The program area 341 has a first transfercontrol program PGM2 and a second transfer program PGM3 as subroutines.Programs for a reset process, file managing process and the like arealso stored, although not shown.

The vector VCT1 has information on the leading address of theprogrammable area 70. The extended program PGM1 is stored starting fromthe leading address of programmable area 70. The vector VCT2 hasinformation on the leading address of the storage area of the firsttransfer control program PGM2. The vector VCT3 has information on theleading address of the storage area of the second transfer controlprogram PGM3.

The first transfer control program PGM2 is a transfer control programfor storing an extended program PGM1 externally supplied to the memorycard LSI 1 in the programmable area 70 starting from the leading addressof the same. The second transfer control program PGM3 is a transfercontrol program for reading an extended program PGM1 which has beentransferred to the flash memory 4 in the form of a file or which hasbeen stored therein in advance at a manufacturing step and for storingthe same in the programmable area 70 starting from the leading addressthereof.

FIG. 6 schematically shows a process of executing an extended programPGM1 stored in the programmable area 70. The execution of the extendedprogram PGM1 stored in the programmable area 70 is instructed by anextended program execution command CMD1 externally supplied to theinterface control circuit 2. When the extended program execution commandCMD1 is input to the command input register 24 of the interface controlcircuit 2, the command decoder 24 decodes the same and, upon receipt ofthe result of the decoding, the control logic circuit 26 outputs aninterrupt signal NMI and notifies the CPU 30 of a first cause associatedwith the extended program execution command. After performing a requiredstate saving process and the like, the CPU 30 retrieves a first vectorVCT1 associated with the first cause from the vector table 340 andproceeds to the execution of the extended program PGM1 in theprogrammable area 70.

FIG. 7 schematically shows a process of executing the first transfercontrol program PGM2. The execution of the first transfer controlprogram PGM2 is instructed by an external transfer control executioncommand CMD2 for an extended program externally supplied to theinterface control circuit 2. When the external transfer controlexecution command CMD2 for an extended program is input to the commandinput register 20 of the interface control circuit 2, the commanddecoder 24 decodes the same and, upon receipt of the result of thedecoding, the control logic circuit 26 outputs an interrupt signal NMIand notifies the CPU 30 of a second cause associated with the externaltransfer control execution command. After performing a required statesaving process and the like, the CPU 30 retrieves a second vector VCT2associated with the second cause from the vector table 340 and proceedsto the execution of the first transfer control program PGM2.

FIG. 8 schematically shows a process of executing the second transfercontrol program PGM3. The execution of the second transfer controlprogram PGM3 is instructed by an internal transfer control executioncommand CMD3 for an extended program externally supplied to theinterface control circuit 2. When the internal transfer controlexecution command CMD3 for an extended program is input to the commandinput register 24 of the interface control circuit 2, the commanddecoder 24 decodes the same and, upon receipt of the result of thedecoding, the control logic circuit 26 outputs an interrupt signal NMIand notifies the CPU 30 of a third cause associated with the internaltransfer control execution command. After performing a required statesaving process and the like, the CPU 30 retrieves a third vector VCT3associated with the third cause from the vector table 340 and proceedsto the execution of the second transfer control program PGM3.

As described above, it is possible to cause the CPU 30 to executeseparate programs for purposes including testing or debugging using thebuffer RAM 7 without any additional program memory. In the memory cardLSI-1 constituted by a single chip, even when a random increase of thestorage capacity of the ROM 34 is inhibited by limitations on the chipsize and the like, the programs for purposes including debugging ortesting can be executed within the limitations. Further, referring tocontrol over the transfer of an extended program PGM1 to the buffer RAM7, since the transfer of an extended program PGM1 externally supplied orstored in the integrated flash memory 4 can be controlled by the filememory 1 itself, the file memory 1 has preferable usability with respectto an extended program.

As described above, other modes of data transfer using the buffer RAM 7include modes of utilization inherent in a file memory in which it isused as a data buffer when file data are written in the flash memory 4(FIG. 9) and in which it is used as a data buffer when file data held inthe flash memory 4 are read out (FIG. 10). There are other modes ofutilization of the buffer RAM 7 in which it is used as a data bufferwhen work data are input and output to and from the CPU 30 as shown inFIG. 11 and in which it is used as a data buffer when work data areexchanged between the CPU 30 and the flash memory 4 as shown in FIG. 12.

[Memory]

An example of the flash memory 4 will now be described for reference.First, a description will be made with reference to FIGS. 13A and 13B ona principle of the storage of information in the flash memory.

The memory cell shown in FIG. 13A as an example is constituted by aninsulated gate type field effect transistor having a double layer gatestructure. In FIG. 13A, 431 represents a p-type silicon substrate; 432represents a p-type semiconductor region formed on said siliconsubstrate 431; and 433 and 434 represent n-type semiconductor regions.435 represents a floating gate formed above the p-type silicon substrate431 with a thin oxide film 436 (having a thickness of, for example, 10nm) as a tunnel insulation film interposed therebetween, and 437represents a control gate formed above the floating gate 435 with anoxide film 438 interposed therebetween. The source is constituted by theregion 434, and the drain is constituted by the regions 433 and 432.Information stored in this memory cell is held in the transistorsubstantially as a change in a threshold voltage. In the followingdescription, a transistor of a memory cell for storing information(hereinafter also referred to as “memory cell transistor”) is of then-channel type unless otherwise specified.

For example, an operation of writing information in a memory cell iscarried out by applying a high voltage to the control gate 437 and thedrain and by injecting electrons into the floating gate 435 from thedrain side using avalanche injection. As a result of the writeoperation, as shown in FIG. 13B, the threshold voltage of the storagetransistor as viewed from the control gate 437 becomes higher than thatof a storage transistor in an erase state which has not been subjectedto a write operation.

For example, an erase operation is carried out by applying a highvoltage to the source and by extracting electrons from the floating gate435 toward the source using the tunnel phenomenon. Shown in FIG. 13B,the threshold voltage of the storage transistor as viewed from thecontrol gate 437 becomes lower by erase operation. As shown in FIG. 13B,the threshold voltage of a memory cell transistor is a positive voltagelevel in both of the write and erase states. Specifically, the thresholdvoltage in the write state is higher than a word line selection levelsupplied from a word line to the control gate 437, and the thresholdvoltage in the erase state is lower than the same. Since such arelationship exists between the two threshold voltages and the word lineselection level, the memory cell can be constituted by a singletransistor without using a selection transistor. Since storedinformation is electrically erased by extracting electrons accumulatedin the floating gate 435 toward the source electrode, a continuous eraseoperation for a relatively long time will extract electrons in aquantity larger than that of the electrons injected into the floatinggate 435 at the write operation. Therefore, when an over-erase isperformed in which an electrical erase is continued for a relativelylong time, the threshold voltage of the memory cell transistor becomes,for example, a negative level, which results in a problem in thatselection occurs in spite of the fact that the word line is at anunselect level. Writing may be carried out utilizing a tunnel currentsimilarly to erasing.

During a read operation, in order to prevent a weak write in the memorycell or unwanted injection of the carrier into the floating gate 435,the voltage applied to the drain and the control gate 437 is limited toa relatively small value. For example, a low voltage on the order of 1 Vis applied to the drain, and a low voltage on the order of 5 V isapplied to the control gate 437. The magnitude of the channel currentflowing through the memory cell transistor is detected by applying thosevoltages to allow the information stored in the memory cell to bedetermined as “0” or “1”.

FIG. 14 shows a principle of the configuration of a memory cell arrayutilizing memory cell transistors as described above. FIG. 14 shows fourtypical memory cell transistors Q1 through Q4. In the memory cellsarranged in X- and Y-directions in the form of a matrix, the controlgates of the memory cell transistors Q1 and Q2 (Q3 and Q4) arranged onthe same row (selection gates of the memory cells) are connected to arespective word lines WL1 (WL2), and the drain regions of the storagetransistors Q1 and Q3 (Q2 and Q4) arranged on the same column(input/output nodes of the memory cells) are connected to a respectivedata line DL1 (DL2). The source regions of the storage transistors Q1and Q3 (Q2 and Q4) are coupled to a source line SL1 (SL2).

FIGS. 15A, 15B and 15C show examples of conditions for voltages for theerase and write operations on the memory cells. In those figures, thememory elements are the memory cell transistors, and the gates are thecontrol gates as the selection gates of the memory cell transistors. Inthose figures, erasure based on a negative voltage method is carried outby applying a negative voltage, e.g., −10 V to the control gate togenerate a high electrical field required for erasure. As apparent fromvoltage conditions shown in the figures, erasure based on a positivevoltage method allows at least memory cells whose sources are commonlyconnected to be erased at a time. Therefore, when the source lines SL1and SL2 are connected in the configuration in FIG. 14, the four memorycells Q1 through Q4 can be erased at a time. According to a source linedivision method, data lines may serve as units (common source linesextend in the direction of data lines) as typically illustrated in FIG.14 or word lines may alternatively serve as units (common source linesextend in the direction of source lines). Erasure based on the negativevoltage method allows memory cells whose control gates are commonlyconnected to be erased at a time.

FIG. 16 shows an example of the flash memory 4. In FIG. 16, 403represents a memory array which has memory mats and sense latchcircuits. The memory mat has a multiplicity of non-volatile memory celltransistors which can be electrically erased and written. For example,the memory cell transistors have a configuration including a source anda drain formed on a semiconductor substrate or in a memory well, afloating gate formed in a channel region with a tunnel oxide filminterposed and a control gate overlaid on the floating gate with a layerinsulation film interposed as described with reference to FIG. 13. Thecontrol gates are connected to word lines 406; the drains are connectedto bit lines 405; and the sources are connected to source lines whichare not shown.

External input/output terminals I/O0 through I/O7 are also used asaddress input terminals, data input terminals, data output terminals andcommand input terminals. X-address signals input through the externalinput/output terminals I/O0 through I/O7 are supplied to an X-addressbuffer 408 through a multiplexer 407. An X-address decoder 409 decodesinternal complementary address signals output by the X-address buffer408 to drive the word lines.

Although not shown, the memory mats included in the memory array 403 areconfigured on the left and right of the sense latch circuit array.Specifically, precharge circuits, bit lines and the like are provided atboth of the input and output nodes of the sense latch circuits. The bitlines 405 are selected based on a selection signal output by a Y-addressdecoder 411 by Y gate array circuit 413. Y-address signals input throughthe external input/output terminals I/O0 through I/O7 are preset in aY-address counter 412, and address signals which are sequentialincrements starting with the preset values are supplied to the Y-addressdecoder 411.

A bit line selected by a Y gate array circuit 413 is conducted to aninput terminal of an output buffer 415 during a data output operationand is conducted to an output terminal of an input buffer 417 through adata control circuit 416 during a data input operation. The connectionbetween the output buffer 415, input buffer 417 and input/outputterminals I/O0 through I/O7 is controlled by the multiplexer 407.Commands supplied through the input/output terminals I/O0 through I/O7are supplied to a mode control circuit 418 through the multiplexer 407and input buffer 417. The data control circuit 416 is capable ofsupplying the memory array 403 with not only data supplied through theinput/output terminals I/O0 through I/O7 but also data having logicalvalues in accordance with the control of the mode control circuit 418.

A control signal buffer circuit 419 is supplied with a chip enablesignal CEb, an output enable signal OEb, a write enable signal WEb, aserial clock signal SC, a reset signal RESb and a command enable signalCDEb as access control signals.

The mode control circuit 418 controls a function of interfacing externalsignals according to the states of those signals and controls internaloperations according to command codes. When a command or data is inputto the input/output terminals I/O0 through I/O7, the signal CDEb isasserted; the signal WEb is asserted further if it is a command; and thesignal WEb is negated if it is data. When an address is input, thesignal CDEb is negated and the signal WEb is asserted. This allows themode control circuit 418 to discriminate between commands, data andaddresses input through the external input/output terminals I/O0 throughI/O7 on a multiplex basis. During an erase or write operation, the modecontrol circuit 418 can externally indicate such a state by asserting aready/busy signal R/Bb.

An internal power supply circuit 420 generates various operating powersupplies 421 for purposes such as write, erase verify and read andsupplies them to the X-address decoder 409 and memory cell array 403.

The mode control circuit 418 controls the flash memory 4 as a wholeaccording to commands. The operation of the flash memory 4 is basicallydetermined by the commands.

The commands allocated to the flash memory include, for example, read,erase and write commands. The read command is constituted by a firstcommand, and the other commands are constituted by a first command and asecond command.

The flash memory 4 has a status register 423 for indicating the internalstatus thereof, and the contents of the same can be read through theinput/output terminals I/O0 through I/O7 when the signal OEb isasserted.

When a write operation is instructed by the write command, the senselatch circuits can latch write data supplied through the Y gate arraycircuit 413. In this example, since the flash memory 4 has theinput/output terminals I/O0 through I/O7 for eight bits, write data canbe set in eight sense latch circuits at one cycle of input of writedata. In the context of this description, since writing is performed ona word line basis, a write voltage is applied to cause a write operationafter write data are set in sense latch circuits associated with the bitlines of all memory cells whose selection terminals are coupled to oneword line. At a write operation, for example, all bit lines areprecharged to a predetermined level in advance; the bit lines of memorycells selected for writing are discharged down to a ground potential;and the bit lines of memory cells unselected for writing are maintainedat the precharge level. When a high write voltage is applied to wordlines selected for writing, a high voltage is applied between thecontrol gates and drains of the memory cells selected for writing toincrease the threshold voltage of the memory cells selected for writing,which, realizes a write state. Prior to a write operation, the memorycells are in an erase state in which the threshold voltage is low. Thethreshold voltages for write and erase may be defined reversely.

The reset signal RESb in FIG. 16 is a signal that corresponds to thereset signal RES3 in FIG. 1. The multiplexer 407 and control signalbuffer circuit 419 in FIG. 16 exchange input/output signals with the FCL13 in FIG. 1.

A description will now be made on an example of static memory cells thatconstitute the integrated SRAM 35, work RAM 8 and buffer RAM 7. FIG. 17one typical static memory cell 70. The static memory cell 70 has a pairof CMOS inverters formed by an n-channel type MOS transistor 71 and ap-channel type MOS transistor 72, and an input terminal of one of theCMOS inverters is cross-coupled to an output terminal of the other CMOSinverter to form a static latch. A pair of storage nodes of the staticlatch are coupled to complementary bit lines 78 t and 78 b throughn-channel type selections MOS transistors 75 and 76. The gates of theselection MOS transistors 75 and 76 are coupled to a word line 77.

While the invention conceived by the inventor has been specificallydescribed based on preferred embodiments thereof, the invention is notlimited to the embodiments and may obviously modified in various wayswithout departing from the principle of the invention.

For example, the program stored in the buffer memory is not limited to aprogram for testing or debugging and may be a file data compressionprogram or the like. The term “memory card” in the context of thepresent specification is not meant to exclude other functions, and it isused on an assumption that a memory card at least has a function ofstoring file data and may include communication interface functions suchas those of MODEMs and TAs (terminal adapters), networking functionssuch as that of LANs (local area networks), video capture functions,voice recognizing functions and the like. Therefore, programs used forsuch functions may be stored in the buffer memory.

The programmable area is not limited to a partial storage area of thebuffer memory, and it may be the entire area of the same.

The above-described commands and data are not limited to serial signalsand may be parallel signals.

The cluster size is not limited to four sectors and may be appropriatelydetermined in accordance with the configuration of the memory mats ofthe flash memory, the storage capacity of the integrated SRAM thatdevelops the management table and the like.

The term “microcomputer” implies logic circuit units having a functionof fetching and executing instructions and does not limit the inventionto configurations in which a single microcomputer uses verified designdata of an LSI associated therewith. The microcomputer may be a circuithaving a new customized design.

The memory card LSI has been described as a single chip. The single chipconfiguration is expected to provide a higher operating speed and lowerpower consumption in comparison to multi-chip configurations.

Effects that can be achieved by typical aspects of the inventiondisclosed in this application can be summarized as follows.

Since a buffer memory used for writing and reading file data can be alsoused as a program memory, separate programs for purposes such as testingor debugging can be executed using the buffer memory without anyadditional program memory. In a memory card constituted by a singlechip, even when a random increase of the storage capacity of the ROM isinhibited by limitations on the chip size and the like, programs forpurposes including debugging or testing can be executed within thelimitations. Further, referring to control over the transfer of anextended program to the buffer memory, since the transfer of an extendedprogram externally supplied or stored in an integrated flash-memory canbe controlled by the file memory itself, the file memory has preferableusability with respect to an extended program.

1. A nonvolatile memory apparatus comprising: a plurality of terminalsincluding a first terminal for receiving a clock signal, a secondterminal for receiving a command, and a third terminal for receiving andfor outputting data in response to the clock signal received from thefirst terminal; a control circuit having a central processing unit; aprogram memory storing first operation steps for performing an operationof the nonvolatile memory apparatus therein by executing the centralprocessing unit; a volatile memory; and a nonvolatile memory, whereinthe program memory and the volatile memory are assigned in a part of anaddress space of the central processing unit, wherein the nonvolatilememory is capable of storing a first data and a second data, wherein thecentral processing unit controls to storing the first data to thevolatile memory for arbitrary one of storing into the nonvolatile memoryand outputting to outside of the nonvolatile memory apparatus thereofvia the third terminal by performing the first operation steps stored inthe program memory in response to receiving a first command via thesecond terminal, and is capable of executing the second data as secondoperation steps storing in the volatile memory in response to receivinga second command via the second terminal, and wherein the controlcircuit is adapted to setting arbitrary one of a first mode and a secondmode, is adapted to make an internal clock signal stop supplying duringthe second mode.
 2. A nonvolatile memory apparatus according to claim 1,further comprising an oscillator, wherein the oscillator generates theinternal clock signal, is adapted to supplying the internal clock signalto the control circuit during the first mode, and is adapted to stopsupplying the internal clock signal during the second mode.
 3. Anonvolatile memory apparatus according to claim 2, wherein the controlcircuit transits from the second mode to the first mode by receiving aninterrupt signal in response to receiving the command received from thesecond terminal.
 4. A nonvolatile memory apparatus according to claim 3,further comprising an interface circuit, wherein the interface circuitcouples to the first to the third terminals, and issues the interruptsignal to the control circuit in response to receiving the command viathe second terminal.
 5. A nonvolatile memory apparatus according toclaim 1, wherein the second data is a program for testing thenonvolatile memory apparatus thereof.
 6. A nonvolatile memory apparatusaccording to claim 1, wherein the control circuit, the program memory,and the volatile memory are structured on one semiconductor substrate.